<div class="zs-body" data-ng-init="formInit('schedule', {
        keyField:'id',
        randomFields:['id'],
        pageSzie:10,
        orderObject:{cjsj:1}
    }) && loadData('schedule');setConHei();">
	<div class="zs-map-tool">
		<div class="location">
			<a href="javascript:;">首页</a>
			<i class="right-arr"></i>
			<a href="javascript:;">任务管理</a>
			<i class="right-arr"></i>
			<a href="javascript:;">日常安排</a>
		</div>
		<div class="option">
			<input type="button" class="zs-btn orange" value="新建" ng-click="addScheduleRow();" />
			<input type="button" class="zs-btn orange" value="编辑" ng-click="editRow('schedule', schedule.sRows[0]) && openWindow('edit')" />
			<input type="button" class="zs-btn orange" value="删除 " ng-click="delEntitys('schedule')" />
		</div>
	</div>
	<div class="zs-content" style="position:unset">
		<div class="zs-nice-tab idTabs">
			<div class="tool item" style="margin-left:6px;">

				<span class="search-warpper">
					<i class="icon"></i>
					<input type="text" class="zs-input" placeholder="项目名称" ng-model="schedule.queryObject['xmmc:like']" />
				</span>
				<span class="search-warpper">
					<i class="icon"></i>
					<input type="text" class="zs-input" placeholder="主题" ng-model="schedule.queryObject['zhuti:like']" />
				</span>
				<span class="search-warpper" style="width: 65px;">负责人
				</span>
				<span class="search-warpper">
					<i class="icon"></i>
					<!-- <input type="text" class="zs-input" placeholder="负责人" ng-model="schedule.queryObject['fzrmc:like']" /> -->
					<ag-Combotree class="zs-input" style="width:175px;height: 28px" para="{ uDictionary:false,
							pidField:'userid',
							checkbox:false,
							valueField:'userid',
							textField:'userName',
							onlyLeafCheck:true,
							bindFn:'schedule',
							foreignField:'departmentId',
							editable:true,
							keyField:'userid',
							queryFields:'userid,userName,departmentId',
							pageSize:1200,
							maxNavs:6,
							queryObject:{},
							ssn:'vuserinfo'}"
					 ng-model="schedule.queryObject['fzr:=']" text-Value="schedule.editRow.fzrmc"></ag-Combotree>
				</span>
				<span class="search-warpper" style="width: 65px;">任务时间
				</span>
				<span class="search-warpper" style="width: 175px;">
					<ag-Datebox class="zs-input" style="width:175px;height: 28px" ng-model="schedule.queryObject['kssj:>=']">
					</ag-Datebox>
				</span>
				-
				<span class="search-warpper" style="width: 175px;">
					<ag-Datebox class="zs-input" style="width:175px;height: 28px" ng-model="schedule.queryObject['jssj:<=']">
					</ag-Datebox>
				</span>
			</div>
			<div class="operation item" style="margin-top:7px;">
				<input type="button" class="zs-btn orange" value="查询" ng-click="loadData('schedule')" />
			</div>
		</div>
		<div class="date-container">
			<div id="zpgwd">
				<div class="zs-data-table">
					<div class="container">
						<table>
							<thead>
								<tr>
									<th>
										<input id="allCheckbox" type="checkbox" ng-click="selectAll('schedule','allCheckbox');" />
									</th>
									<th>项目名称</th>
									<th>主题</th>
									<th>事项说明</th>

									<th>开始时间</th>
									<th>结束时间</th>
									<th>创建人名称</th>
									<th>创建时间</th>

								</tr>
							</thead>
							<tbody>
								<tr ng-repeat="r in schedule.datas">
									<td>
										<input type="checkbox" ng-click="selectRow('schedule',r);" ng-model="r.selected" />
									</td>

									<td>
										<a ng-click="editRow('schedule',r) && openWindow('edit');">
											<label ng-bind="r.xmmc"></label>
										</a>
									</td>
									<td>
										<a ng-click="editRow('schedule',r) && openWindow('edit');">
											<label ng-bind="r.zhuti"></label>
										</a>
									</td>

									<td>
										<a ng-click="editRow('schedule',r) && openWindow('edit');">
											<label ng-bind="r.sxsm"></label>
										</a>
									</td>

									<td>
										<a ng-click="editRow('schedule',r) && openWindow('edit');">
											<label ng-bind="r.kssj | asDate | date:'yyyy-MM-dd'"></label>
										</a>
									</td>
									<td>
										<a ng-click="editRow('schedule',r) && openWindow('edit');">
											<label ng-bind="r.jssj | asDate | date:'yyyy-MM-dd'"></label>
										</a>
									</td>

									<td>
										<a ng-click="editRow('schedule',r) && openWindow('edit');">
											<label ng-bind="r.cjrmc"></label>
										</a>
									</td>
									<td>
										<a ng-click="editRow('schedule',r) && openWindow('edit');">
											<label ng-bind="r.cjsj | asDate | date:'yyyy-MM-dd'"></label>
										</a>
									</td>

								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="zs-pagination-box">
					<ag-Page fn='schedule'></ag-Page>
				</div>
			</div>
		</div>

		<div ag-Window id="edit" title="日常安排" width='760px' height='586px'>
			<div class="zs-form-tab ibox">
				<form name="form" novalidate>
					<table width="100%">
						<tbody>
							<tr>
								<td class="text" width="20%">
									<font color="red">*</font>项目名称
								</td>
								<td class="left" width="30%" colspan="3">
									<input ng-model="schedule.editRow.xmmc" class="zs-input" style="width:93.5%;" />

									<span ng-show="false"><input hide-novalidate="true" alias="项目名称" required ng-model="schedule.editRow.xmmc"
										 name="formXMMC" /></span>
								</td>

							</tr>

							<tr>
								<td class="text" width="20%">
									<font color="red">*</font>主题
								</td>
								<td class="left" width="30%" colspan="3">
									<input ng-model="schedule.editRow.zhuti" class="zs-input" style="width:93.5%;" />

									<span ng-show="false"><input hide-novalidate="true" alias="主题" required ng-model="schedule.editRow.zhuti" name="formZHUTI" /></span>
								</td>
							</tr>

							<tr>
								<td class="text" width="20%">
									<font color="red">*</font>部门名称
								</td>
								<td class="left" width="30%">
									<span>

										<ag-Combotree class="zs-input" style="width:175px;height: 28px" fn='depEdit' para="{ uDictionary:true,
													dictionary:'p_department',
													pidField:'pid',
													nfn:'schedulefzr',
		                    						leafField:'leaf'}"
										 ng-model="schedule.editRow.bmmc" text-Value="schedule.editRow.bmmcName" />
									</span>
									<span ng-show="false"><input hide-novalidate="true" alias="部门名称" required ng-model="schedule.editRow.bmmc"
										 name="formBMMC" /></span>

								</td>
								<td class="text" width="20%">
									<font color="red">*</font>负责人
								</td>
								<td class="left" width="30%"><span>
										<ag-Combotree class="zs-input" style="width:175px;height: 28px" fn='schedulefzr' para="{ uDictionary:false,
												pidField:'userid',
												checkbox:false,
												valueField:'userid',
												textField:'userName',
												onlyLeafCheck:true,
												bindFn:'schedule',
												pfn:'depEdit',
												foreignField:'departmentId',
												editable:true,
												keyField:'userid',
												queryFields:'userid,userName,departmentId',
												pageSize:1200,
												maxNavs:6,
												queryObject:{},
												ssn:'vuserinfo'}"
										 ng-model="schedule.editRow.fzr" ng-change="onchangeScheduleFzr();" text-Value="schedule.editRow.fzrmc"></ag-Combotree>
									</span>
									<span ng-show="false"><input hide-novalidate="true" alias="负责人" required ng-model="schedule.editRow.fzr" name="formFZR" /></span>
								</td>
							</tr>



							<tr>
								<td class="text" width="20%">
									<font color="red">*</font>开始时间
								</td>
								<td class="left" width="30%"><span>
										<ag-Datebox id='fi_kssj' showcurday="schedule.editRow.FIELD_ISNEW" class="zs-input" style="width:175px;height: 28px"
										 ng-model="schedule.editRow.kssj">
										</ag-Datebox>
									</span>

									<span ng-show="false"><input hide-novalidate="true" alias="开始时间" required ng-model="schedule.editRow.kssj"
										 name="formKSSJ" /></span>
								</td>
								<td class="text" width="20%">
									<font color="red">*</font>结束时间
								</td>
								<td class="left" width="30%"><span>
										<ag-Datebox id='fi_jssj' showcurday="schedule.editRow.FIELD_ISNEW" class="zs-input" style="width:175px;height: 28px"
										 ng-model="schedule.editRow.jssj">
										</ag-Datebox>
									</span>

									<span ng-show="false"><input hide-novalidate="true" alias="结束时间" required ng-model="schedule.editRow.jssj"
										 name="formJSSJ" /></span>
								</td>
							</tr>

							<tr>
								<td class="text" width="20%">备注</td>
								<td class="left" colspan="3">
									<textarea type="text" ng-model="schedule.editRow.sxsm" class="zs-input" style="width:93.5%;height: 180px;"></textarea>
								</td>
							</tr>

							<tr>
								<td class="text" width="20%">状态</td>
								<td class="left" width="30%" colspan="3">
									<ag-Combobox style="width:175px;height:28px;" para="{	uDictionary:true,
                                        		dictionary:'p_rwzt'}"
									 ng-model="schedule.editRow.zt" text-Value="schedule.editRow.ztName" />

								</td>
							</tr>

							<tr>
								<td class="text" width="20%">
									<font color="red">*</font>创建人名称
								</td>
								<td class="left" width="30%">
									<ag-User ng-model="schedule.editRow.cjrid" text-Value="schedule.editRow.cjrmc" id="cjrid" canuse="{{schedule.editRow.FIELD_ISNEW}}"></ag-User>
									<!--<input type="text" ng-model="schedule.editRow.cjrmc" class="zs-input" style="width:175px;"/>-->
								</td>
								<td class="text" width="20%">
									<font color="red">*</font>创建时间
								</td>
								<td class="left" width="30%">
									<ag-Date ng-model="schedule.editRow.cjsj" id="cjsj1" canuse="{{schedule.editRow.FIELD_ISNEW}}"></ag-Date>
								</td>
							</tr>
						</tbody>
						<table width="100%">
							<tr>

								<td colspan="3" class="left">
									<dpsn>
										<font size="3">参与人</font>
									</dpsn>
									<span style="float: right;"> <input type="button" class="zs-btn" ng-click="openWindow('chooseUser')" value="添加" />
										<input type="button" class="zs-btn" ng-click="delLocalRows(schedule.editRow.gztask)" value="删除"></span>
								</td>
							</tr>
							<tr>
								<td style="text-align: center" class="text" width="5%">
									<input id="allCheckbox12" type="checkbox" ng-click="selectRows(schedule.editRow.gztask,'allCheckbox12');" /></td>
								<td width="40%" class="text" style="text-align: center">姓名</td>
								<td width="40%" class="text" style="text-align: center">部门</td>
							</tr>
							<tr ng-repeat="r in schedule.editRow.gztask">
								<td class="center">
									<input type="checkbox" ng-click="selectRow('schedule.editRow.gztask',r);" ng-model="r.selected" /></td>
								<td><span>
										<!--<input type="text" style="width: 95%"
										class="zs-input" ng-model="r.jsrmc" /></td>-->

										<label ng-bind="r.jsrmc"></label>
								<td><span>
										<!--<input type="text" style="width: 95%"
										class="zs-input" ng-model="r.jsrjg" /></td>-->
										<label ng-bind="r.jsrjgmc"></label>
							</tr>
						</table>
						<tfoot>
							<tr>
								<td colspan="4">
									<div style="text-align:center">
										<input type="button" name="ok" value="保存" class="zs-btn c-red" ng-click="setUser('schedule','cyrid','cjrmc') && formValidate(form) && save('schedule', schedule.editRow, closeWindow('edit'))" />
										<input type="button" name="ok" value="取消" class="zs-btn c-green" ng-click="closeWindow('edit')" />
									</div>
								</td>
							</tr>
						</tfoot>
					</table>

				</form>
			</div>
		</div>

		<div ag-Window id="chooseProject" title="选择项目" width='560px' height='360px'>
			<div class="zs-form-tab ibox" data-ng-init="formInit('gzprojectinfo', {
			        keyField:'id',
			        randomFields:['id'],
			        orderObject:{id:0}
			    }) && loadData('gzprojectinfo');setConHei();">
				<div class="zs-nice-tab idTabs">
					<div class="tool item" style="margin-left:6px;">
						<span class="search-warpper">
							<i class="icon"></i>
							<input type="text" class="zs-input" placeholder="项目名称" ng-model="gzprojectinfo.queryObject['sxmmc']" />
						</span>
						<span class="search-warpper">
							<i class="icon"></i>
							<input type="text" class="zs-input" placeholder="项目类型" ng-model="gzprojectinfo.queryObject['sxmlx']" />
						</span>
					</div>
					<div class="operation item">
						<a class="ope-1" ng-click="loadData('gzprojectinfo')"></a>
						<a class="ope-2"></a>
					</div>
					<div class="switch">

					</div>
				</div>
				<div class="date-container">
					<div id="zpgwd">
						<div class="zs-data-table">
							<div class="container">
								<table>
									<thead>
										<tr>
											<th>项目名称</th>
											<th>项目编号</th>
											<th>项目类型</th>
										</tr>
									</thead>
									<tbody>
										<tr ng-repeat="r in gzprojectinfo.datas">
											<!--  项目名称 -->
											<td>
												<a ng-click="chooseProject(schedule.editRow,r,'chooseProject');">
													<label ng-bind="r.sxmmc"></label>
												</a>
											</td>
											<!--  项目编号 -->
											<td>
												<a ng-click="chooseProject(schedule.editRow,r,'chooseProject');">
													<label ng-bind="r.sxmbh"></label>
												</a>
											</td>
											<!--  项目类型 -->
											<td>
												<a ng-click="chooseProject(schedule.editRow,r,'chooseProject');">
													<label ng-bind="r.sxmlx"></label>
												</a>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="zs-pagination-box">
							<ag-Page fn='gzprojectinfo'></ag-Page>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div ag-Window id="chooseUser" title="选择用户" width='600px' height='400px'>
			<div class="zs-form-tab ibox" data-ng-init="formInit('userinfo', {
					ssn:'vuserinfo',
					esn:'userinfo',
					keyField:'userid',
					randomFields:['userid'],
					orderObject:{userid:0} 
				}) && loadData('userinfo');setConHei();">
				<div class="zs-nice-tab idTabs">
					<div class="tool item" style="margin-left:6px;">
						<span class="search-warpper">
							<i class="icon"></i>
							<input type="text" placeholder="姓名" class="zs-input" ng-model="userinfo.queryObject['userName:like']" />
						</span>
						<span>部门:</span>
						<span class="search-warpper">
							<i class="icon"></i>
							<ag-Combobox class="zs-input" style="width:175px;height: 28px" fn='dptidEdit' para="{ uDictionary:true,
										dictionary:'p_department',
										pidField:'pid',
                						leafField:'leaf'}"
							 ng-change="loadData('userinfo');" ng-model="userinfo.queryObject['departmentId:=']" />
						</span>
					</div>
					<div class="operation item" style="margin-top:5px;margin-left:0px;">
						<input type="button" class="zs-btn orange" value="查询" ng-click="loadData('userinfo')" />
						<!--<a class="ope-1" ng-click="loadData('userinfo')"></a>
		                <a class="ope-2"></a>-->
					</div>


				</div>
				<div class="date-container">
					<div id="zpgwd">
						<div class="zs-data-table">
							<div class="container">
								<table>
									<thead>
										<tr>
											<th>
												<input id="allCheckbox11" type="checkbox" ng-click="selectAll('userinfo','allCheckbox11');" />
											</th>
											<th>姓名</th>
											<th>部门</th>
											<!--   <th>所属角色</th>-->
										</tr>
									</thead>
									<tbody>
										<tr ng-repeat="r in userinfo.datas">
											<td>
												<input type="checkbox" ng-click="selectRow('userinfo',r);" ng-model="r.selected" />
											</td>
											<td>
												<a>
													<label ng-bind="r.userName"></label>
													<!--<label ng-if="r.accounts">/</label>
							                        <label ng-bind="r.accounts"></label>-->
												</a>
											</td>
											<td>
												<a>
													<!--  <label ng-bind="r.organizationName"></label>-->
													<label ng-bind="r.departmentName"></label>
													<!-- <label ng-bind="r.operatingPostName"></label>-->
												</a>
											</td>
											<!-- <td>
							                    <a>
							                        <label ng-bind="r.roleNames"></label>
							                    </a>
							                </td>-->
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="zs-pagination-box">
							<ag-Page fn='userinfo'></ag-Page>
						</div>
						<div style="text-align: center;">
							<input type="button" class="zs-btn orange" value="选择 " ng-click="chooseSJR('schedule','gztask','userinfo','chooseUser')" />
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>